<template>

  <GlobalPage>



    <div class="table-box">
      <el-table :data="Data.list" style="width: 100%;font-size: 10px">
        <el-table-column type="selection" width="35" align="center">
        </el-table-column>
        <el-table-column prop="id" label="ID" width="45" align="center">
        </el-table-column>
        <el-table-column label="头像" width="45" align="center">
          <template #default="scope">
            <div class="user-table-avatar">
              <img class="user-table-avatar-img" :src="scope.row.avatar" alt="">
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="username" label="用户名"> </el-table-column>
        <el-table-column prop="logoff_start_date" label="注销时间"> </el-table-column>
        <el-table-column prop="address" label="注销理由"> </el-table-column>
        <el-table-column prop="address" label="剩余时间"> </el-table-column>
        <el-table-column width="50" fixed="right" label="操作" align="center">
          <template #default="{ row, $index: index }">
            <el-dropdown>
              <el-button  circle />
              <template #dropdown>
                <el-dropdown-menu >
                  <el-dropdown-item>查看</el-dropdown-item>
                  <el-dropdown-item>限制</el-dropdown-item>
                  <el-dropdown-item>锁定</el-dropdown-item>
                  <el-dropdown-item>登出</el-dropdown-item>
                </el-dropdown-menu>
              </template>
            </el-dropdown>
          </template>
        </el-table-column>
      </el-table>

      <GlobalPagination></GlobalPagination>
    </div>
  </GlobalPage>
</template>

<script setup>
import API from "@/api";
import { ElMessage } from "element-plus";
import { onBeforeMount, reactive } from "vue";
import GlobalPage from '@/components/Global-Page/Global-Page.vue'
import GlobalPagination from "@/components/GlobalPagination/index.vue";
const Data = reactive({
  page: null,
  pages: null,
  limit: null,
  list: [],
});
onBeforeMount(() => {
  API.Manage.LogoffList()
    .then((res) => {
      console.log(res);
      let { data } = res;
      let { list } = data;
      Data.list.push(...list);
    })
    .catch((err) => {
      console.log(err);
    });
});
// 同意注销
function ClickAgreeLogoff() { }
// 拒绝注销
function ClickRefuseLogoff() { }
</script>
<style>
.table-box {
  padding: 15px;
  background: white;
}

.table-options {
  justify-content: space-around;
}
</style>